import axios from "axios"
export type ListItem = {
    category_id: string
    content: string
    glycemicIndex: string
    imgUrl: string
    level: number
    name: string
    quality: number
    isChecked:boolean
}
export type FoodItem = {
    name:string
    list:ListItem[]
}


export type GetFood = {
    code:number
    msg:string
    value:FoodItem[]
}

export const getFoodApi = () => {
    return axios.get<GetFood>('http://zyxcl.xyz/exam_api/food')
}